package main;

import utils.RaidInfo;
import utils.RaidType;
import utils.RaidUtils;

import com.google.common.primitives.Ints;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		if(args.length != 5) {
			System.out.println("we need 5 args");
			return;
		}
		
		String root = args[0];
		Integer diskCount = Ints.tryParse(args[1]);
		Integer blockCount = Ints.tryParse(args[2]);
		Integer blockSize = Ints.tryParse(args[3]);
		RaidType type = RaidType.parse(args[4]);
		RaidInfo ri = new RaidInfo();
		ri.setBlockCount(blockCount);
		ri.setType(type);
		ri.setBlockSize(blockSize);
		ri.setDiskCount(diskCount);
		RaidUtils.createRaidDisks(root, ri);
	}
}
